<template>
	<view class="indexs">
		<view :class="'header ' + (banertrue ? 'header_lan' : '')" :style="'padding-top: ' + navH + 'px;'">
			<view class="header_height" :style="'height:' + gaodu + 'px;line-height:' + gaodu + 'px;top:' + gaodutops + 'px;'">
				<view class="index_h_cont3">
					<view class="index_wenben_img" @tap="jumpzuo"><image :src="imgUrl + '/dzx_img22.png'" mode="widthFix"></image></view>
					<view class="index_wenben baise">{{ words.withdraw_list.title.value }}</view>
				</view>
			</view>
			<view class="coloe_title">s</view>
		</view>
		<view class="index_banner" style="position: absolute; background: #fff"><image :src="imgUrl + '/dzx_img156.png'" mode="widthFix"></image></view>
		<view class="index_center" :style="'padding-top:' + (navH + 50) + 'px;'">
			<view class="my_yongbingmx_center">
				<view class="my_yongbingmx_item1">
					<view class="my_yongbingmx_item1_top">
						<view class="my_yongbingmx_item1_top_l">
							<view class="my_yongbingmx_item1_top_t1">{{ $t('page_my_balancedetail.jjyjs') }}</view>
							<view class="my_yongbingmx_item1_top_t2">{{ total['sendincome'] }}</view>
						</view>
						<view class="my_yongbingmx_item1_top_l">
							<view class="my_yongbingmx_item1_top_t1">{{ $t('page_my_balancedetail.Receipt_been_settled') }}</view>
							<view class="my_yongbingmx_item1_top_t2">{{ total['pickncome'] }}</view>
						</view>
					</view>
					<!--                    <view class="my_yongbingmx_item1_bottom">
                        <view class="my_yongbingmx_item1_bottom_l" @tap="quanbushow">
                            <text :style="'color:' + (isshow ? '#4ad5ac' : '#666666') + ';'">全部类型</text>
                            <image :src="imgUrl + (isshow ? 'dzx_img159.png' : 'dzx_img133.png')"></image>
                        </view>
                        <view class="my_yongbingmx_item1_bottom_l" @tap="quanbushow2">
                            <text :style="'color:' + (isshow2 ? '#4ad5ac' : '#666666') + ';'">近一个月</text>
                            <image :src="imgUrl + (isshow2 ? 'dzx_img159.png' : 'dzx_img133.png')"></image>
                        </view>
                    </view> -->
				</view>

				<view class="my_yongbingmx_item2">
					<view class="my_yongbingmx_tan" v-if="isshow">
						<view class="my_yongbingmx_tan_list">
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">{{ $t('page_my_balancedetail.all') }}</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img157.png'"></image></view>
							</view>
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">{{ $t('page_my_balancedetail.income') }}</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img158.png'"></image></view>
							</view>
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">{{ $t('page_my_balancedetail.zhuanchu') }}</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img158.png'"></image></view>
							</view>
						</view>
					</view>
					<view class="my_yongbingmx_tan" v-if="isshow2">
						<view class="my_yongbingmx_tan_list">
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">{{ $t('page_my_balancedetail.jinyigeyue') }}</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img157.png'"></image></view>
							</view>
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">{{ $t('page_my_balancedetail.income') }}</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img158.png'"></image></view>
							</view>
							<view class="my_yongbingmx_tan_cont">
								<view class="my_yongbingmx_tan_t1">2021年12月</view>
								<view class="my_yongbingmx_tan_t2"><image :src="imgUrl + '/dzx_img158.png'"></image></view>
							</view>
						</view>
					</view>
					<view class="my_yongbingmx_item2_padding">
						<view class="my_yongbingmx_item2_list">
							<view class="my_yongbingmx_item2_cont" v-for="(item, index) in arrlist" :key="index">
								<view class="my_yongbingmx_item2_cont_l">
									<view class="my_yongbingmx_item2_t1">{{ item.flow_type.text }}</view>
									<view class="my_yongbingmx_item2_t2">{{ $t('page_my_balancedetail.laiyuandingdan') }}{{ item.inpack_id }}</view>
									<view class="my_yongbingmx_item2_t2">{{ item.create_time }}</view>
								</view>
								<view class="my_yongbingmx_item2_cont_r">{{ item.flow_type != 30 ? '+' : '' }}{{ item.money }}</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
// pages/shouye/shouye_zkc/shouye_zkc.js
const app = getApp();
let request = require('../../../utils/require');
export default {
	data() {
		return {
			navH: app.globalData.navHeight,
			gaodu: app.globalData.height,
			gaodutops: app.globalData.top,
			imgUrl: app.globalData.imgUrl,
			banertrue: false,
			isshow: false,
			arrlist: [],
			isshow2: false,
			words: ''
		};
	}, //滑动显示顶部
	onPageScroll: function(e) {
		if (e.scrollTop > this.navH + 50) {
			this.banertrue= true
		} else {
			this.banertrue= false
		}
	},
	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad() {
		var that = this;
		that.dealerlist();
	},
	onShow() {
		var that = this;
	},
	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {},
	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {},
	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {},
	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {},
	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {},
	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {},
	methods: {
		//获取所有的分销订单
		dealerlist(e) {
			var that = this;
			var data = {
				type: e,
				token: uni.getStorageSync('token'),
				page: that.page
			};
			request.get(`index.php?s=/api/shop.capital/lists&wxapp_id=` + uni.getStorageSync('web_id'), data).then(res => {
				if (res.data.code == 1) {
					if (that.page > res.data.data.last_page) {
						that.ispage= false
					} else {
						console.log(that.arrlist, '????arrlist');
						that.total= res.data.data.total
						that.arrlist= that.arrlist.concat(res.data.data.list.data)
						that.words= res.data.data.words
					}
				}
			});
		},

		quanbushow2() {
			this.isshow2= !this.isshow2
			this.isshow= false
		},

		quanbushow() {
			this.isshow=!this.isshow
			this.isshow2= false
		},

		jumpzuo() {
			uni.navigateBack();
		}
	}
};
</script>
<style>
@import './my_balancedetail.css';
</style>
